package com.excel;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.usermodel.WorkbookFactory;

import com.excel.model.ExcelData;

public abstract class KeyWordSeacher {

	protected Workbook book ;

	public KeyWordSeacher(String path){
		try {
			this.book = WorkbookFactory.create(new FileInputStream(path));
		} catch (InvalidFormatException e) {
			throw new RuntimeException(e);
		} catch (FileNotFoundException e) {
			throw new RuntimeException(e);
		} catch (IOException e) {
			throw new RuntimeException(e);
		}
	}
	
	public abstract ExcelData  search(String keyword);
	

}
